<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "banner".
 *
 * @property string $ad_id
 * @property string $name
 * @property string $url
 * @property integer $created_at
 * @property integer $updated_at
 * @property integer $is_del
 * @property integer $type
 */
class Banner extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'banner';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['created_at', 'updated_at', 'is_del', 'type'], 'integer'],
            [['name'], 'string', 'max' => 100],
            [['url'], 'string', 'max' => 500],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ad_id' => 'Ad ID',
            'name' => '名字',
            'url' => '图片',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'is_del' => 'Is Del',
            'type' => 'Type',
        ];
    }
}
